package com.cet.lxf.generic.test03;

import java.util.Arrays;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-08-03 10:16
 **/
public class Main02 {
    public static void main(String[] args) {
        String[] ss = ArrayHelper.asArray("a", "b", "c");
        Integer[] ns = ArrayHelper.asArray(1, 2, 3);

        Arrays.stream(ss).forEach(System.out::println);
    }
}

class ArrayHelper {
    @SafeVarargs
    static <T> T[] asArray(T... objs) {
        return objs;
    }
}
